#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution
{
public:
    int MoreThanHalfNum_Solution(vector<int>& numbers)
    {
        sort(numbers.begin(), numbers.end());
        return numbers[numbers.size() / 2];
    }
};
int main()
{
    vector<int> numbers{1,2,3,2,2,2,5,4,2};
    Solution sl;
    Solution s2;
    cout<<sl.MoreThanHalfNum_Solution(numbers);
    return 0;
}
